﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:DragonSpark.Application.Presentation.Controls">
	<Style TargetType="Controls:ButtonPanel"
		   x:Key="buttonPanel">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Controls:ButtonPanel">
					<Border Margin="0 6 0 0">
						<ItemsPresenter />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<StackPanel Orientation="Horizontal"
								HorizontalAlignment="Right" />
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<Button Content="{Binding Content}"
							Margin="2 0 0 0"
							MinWidth="60"
							ToolTipService.ToolTip="{Binding ToolTip}"
							/>
				</DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="Controls:DialogChrome" x:Key="DefaultDialogChrome">
		<Setter Property="IsTabStop" 
				Value="false"/>
	   <!-- <Setter Property="TabNavigation" 
				Value="Cycle"/>-->
		<Setter Property="HorizontalAlignment" 
				Value="Center"/>
		<Setter Property="VerticalAlignment" 
				Value="Center"/>
		<Setter Property="HorizontalContentAlignment" 
				Value="Center"/>
		<Setter Property="VerticalContentAlignment" 
				Value="Center"/>
		<Setter Property="BorderThickness" 
				Value="1"/>
		<Setter Property="BorderBrush">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA3AEB9" Offset="0"/>
					<GradientStop Color="#FF8399A9" Offset="0.375"/>
					<GradientStop Color="#FF718597" Offset="0.375"/>
					<GradientStop Color="#FF617584" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<!--<Setter Property="OverlayBrush" 
				Value="#58DFDFDF"/>-->
		<!--<Setter Property="OverlayOpacity" 
				Value="1"/>-->
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Controls:DialogChrome">
					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
						<AdornerDecorator>
							<DockPanel>
								<Controls:ButtonPanel DockPanel.Dock="Bottom"
															  Style="{StaticResource buttonPanel}"
															  Margin="4"
															  Buttons="{TemplateBinding Buttons}" />
								<Border Background="{TemplateBinding Background}">
									<ContentPresenter x:Name="ContentPresenter" 
															  Margin="4"
															  HorizontalAlignment="Stretch" 
															  VerticalAlignment="Stretch" 
															  Content="{TemplateBinding Content}" 
															  ContentTemplate="{TemplateBinding ContentTemplate}"/>
								</Border>
							</DockPanel>
						</AdornerDecorator>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>